<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>bash &mdash; cat writebug.cn/history</title>
  <meta name="author" content="zhiliao">
  <meta name="description" content="bash" />

  <meta name="keywords" content="开发者,程序,博客园,程序猿,程序媛,极客,码农,编程,代码,软件开发,开源,IT网站,技术社区,Developer,Programmer,Coder,Geek,Coding,Code,writebug,bug,写bug,linux,vim,编程语言,调试" />

  <link href="/feeds/all.atom.xml" type="application/rss+xml" rel="alternate"
        title="cat writebug.cn/history RSS Feed" />





  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">


    <link href="/favicon.png" rel="icon">

  <link href="/theme/css/main.css" media="screen, projection"
        rel="stylesheet" type="text/css">
  <link href="/theme/css/pygment.css" rel="stylesheet" type="text/css">

  <!--
  <link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  <link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  -->


  <script src="/theme/js/modernizr-2.0.js"></script>
  <script src="/theme/js/ender.js"></script>
  <script src="/theme/js/octopress.js" type="text/javascript"></script>
</head>

<body >
  <header role="banner"
  >
<hgroup>
  <h1><a href="/">cat writebug.cn/history</a></h1>
    <h2>一个开发者的技术博客。</h2>
</hgroup></header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/feeds/all.atom.xml" rel="subscribe-rss">RSS</a></li>
</ul>


<ul class="main-navigation">
    <li><a href="/">Home</a></li>
    <li><a href="/archives.html">Archive</a></li>
    <li><a href="/pages/todolist.html">TodoList</a></li>
    <li><a href="/pages/about.html">About</a></li>
</ul></nav>
  <div id="main">
    <div id="content">
<div>
  <article class="hentry" role="article">
<header>
      <h1 class="entry-title">bash</h1>
    <p class="meta">
<time datetime="2014-09-26T21:55:00+08:00" pubdate>2014-09-26 21:55:00</time>      
    </p>
</header>

    <div class="entry-content"><h4>Linux 下shell基本上默认是 bash, 下面是我总结的一些技巧。</h4>
<h4>bash 重定向</h4>
<div class="highlight-custom"><pre><span></span><code>find<span class="w"> </span>/etc<span class="w"> </span>-name<span class="w"> </span>passwd<span class="w">  </span><span class="m">1</span>&gt;<span class="w"> </span><span class="m">1</span>.txt<span class="w"> </span><span class="c1"># 把标准输出重定向到 1.txt，屏幕上只显示错误输出</span>
find<span class="w"> </span>/etc<span class="w"> </span>-name<span class="w"> </span>passwd<span class="w">  </span><span class="m">2</span>&gt;<span class="w"> </span><span class="m">1</span>.txt<span class="w"> </span><span class="c1"># 略</span>
find<span class="w"> </span>/etc<span class="w"> </span>-name<span class="w"> </span>passwd<span class="w">  </span><span class="m">2</span>&gt;<span class="p">&amp;</span><span class="m">1</span><span class="w">  </span>&gt;<span class="w"> </span><span class="m">1</span>.txt<span class="w"> </span><span class="c1"># 标准错误标准输出，同时导出到一个文件</span>
find<span class="w"> </span>/etc<span class="w"> </span>-name<span class="w"> </span>passwd<span class="w">  </span><span class="p">&amp;</span>&gt;<span class="w">  </span><span class="m">1</span>.txt<span class="w"> </span><span class="c1"># 标准错误标准输出，同时导出到一个文件  &amp;代表all(0,1,2,3....)，不建议使用</span>

tr<span class="w"> </span><span class="s1">&#39;a-z&#39;</span><span class="w"> </span><span class="s1">&#39;A-Z&#39;</span><span class="w"> </span><span class="o">&lt;&lt;&lt;</span><span class="w"> </span><span class="s2">&quot;hello&quot;</span>

tr<span class="w"> </span><span class="s1">&#39;a-z&#39;</span><span class="w"> </span><span class="s1">&#39;A-Z&#39;</span><span class="w"> </span><span class="s">&lt;&lt;EOF</span>
<span class="s">hello world</span>
<span class="s">EOF</span>
</code></pre></div>

<h4>历史命令搜索</h4>
<div class="highlight-custom"><pre><span></span><code>ctrl+r  
ctrl+r 搜索下一条
</code></pre></div>

<h4>trap 可以捕获信号</h4>
<h4>目录跳转</h4>
<p>pushd, popd, dirs 实现多目录跳转
pushd 命令用来更改您的当前目录并将其存储在堆栈中。 popd 命令用来从堆栈的顶部移除目录并使您返回该位置。 dirs 命令来显示当前目录堆栈。（dir –v –p)
pushd +n; popd +n 可以操作虚拟目录堆栈
 </p>
<h4>快速跳至常用目录</h4>
<p>你可能已经知道$PATH变量可以列出 bash的“搜索路径”——当在当前目录不能找到请求的文件时，bash会自动搜索的目录。不过，bash也支持$CDPATH变量，当试图改变目录时该变量列出cd命令转向的目录。为了使用这个特性，我们要对$CDPATH变量赋值一个目录列表，如下面的例子所示：
bash&gt; CDPATH='.:~:/usr/local/apache/htdocs:/disk1/backups'
bash&gt; export CDPATH
现在，无论何时使用cd命令，bash将会检查$CDPATH列表中的所有目录来查找要转向的目录名。
 </p>
<h4>特殊参数</h4>
<div class="highlight-custom"><pre><span></span><code><span class="mf">1.</span><span class="w"> </span><span class="err">$</span><span class="o">*</span><span class="p">:</span><span class="w"> </span><span class="n">代表所有参数</span><span class="err">，</span><span class="n">其间隔为IFS内定参数的第一个字元</span><span class="w"> </span>
<span class="mf">2.</span><span class="w"> </span><span class="err">$@</span><span class="p">:</span><span class="w"> </span><span class="n">与</span><span class="o">*</span><span class="n">星号类同</span><span class="err">。</span><span class="n">不同之处在於不参照IFS</span><span class="w"> </span>
<span class="mf">3.</span><span class="w"> </span><span class="err">$#</span><span class="p">:</span><span class="w"> </span><span class="n">代表参数数量</span><span class="w"> </span>
<span class="mf">4.</span><span class="w"> </span><span class="err">$?</span><span class="p">:</span><span class="w"> </span><span class="n">执行上一个指令的返回值</span><span class="w"> </span>
<span class="mf">5.</span><span class="w"> </span><span class="err">$</span><span class="o">-</span><span class="p">:</span><span class="w"> </span><span class="n">最近执行的foreground</span><span class="w"> </span><span class="n">pipeline的选项参数</span><span class="w"> </span>
<span class="mf">6.</span><span class="w"> </span><span class="err">$$</span><span class="p">:</span><span class="w"> </span><span class="n">本身的Process</span><span class="w"> </span><span class="n">ID</span><span class="w"> </span>
<span class="mf">7.</span><span class="w"> </span><span class="err">$!</span><span class="p">:</span><span class="w"> </span><span class="n">执行上一个背景指令的PID</span><span class="w"> </span>
<span class="mf">8.</span><span class="w"> </span><span class="err">$</span><span class="n">_</span><span class="p">:</span><span class="w"> </span><span class="n">显示出最後一个执行的命令</span>
</code></pre></div>

<h4>bash快捷键</h4>
<ul>
<li>Emacs风格</li>
<li>ctrl+p: 方向键 上 ↑ </li>
<li>ctrl+n: 方向键下 ↓ </li>
<li>ctrl+b: 方向键 ← </li>
<li>alt+f: 光标右移一个单词 </li>
<li>ctrl+f :方向键 → </li>
<li>alt+b: 光标左移一个单词 </li>
<li>ctrl+a:光标移到行首 </li>
<li>ctrl+e:光标移到行尾 </li>
<li>ctrl+k:清除光标后至行尾的内容。 </li>
<li>ctrl+d: 删除光标所在字母;注意和backspace以及ctrl+h的区别，这2个是删除光标前的字符 </li>
<li>ctrl+r:搜索之前打过的命令。会有一个提示，根据你输入的关键字进行搜索bash的history </li>
<li>ctrl+m : 输入回车 </li>
<li>ctrl+i : 输入tab </li>
<li>ctrl+[ : 输入esc</li>
<li>其它 </li>
<li>ctrl+h:删除光标前一个字符，同 backspace 键相同。 </li>
<li>alt + p 非增量方式反向搜索历史 </li>
<li>alt + &gt; 历史命令列表中的最后一行命令开始向前 </li>
<li>ctrl+u: 清除光标前至行首间的所有内容。 </li>
<li>ctrl+w: 移除光标前的一个单词 </li>
<li>ctrl+t: 交换光标位置前的两个字符 </li>
<li>ctrl+y: 粘贴或者恢复上次的删除 </li>
<li>ctrl+l:清屏，相当于clear。 </li>
<li>ctrl + xx 光标在行头与行尾进行跳转 </li>
<li>alt+r 撤销当前行的所有内容 </li>
<li>ctrl+z : 把当前进程转到后台运行 </li>
<li>ctrl+s : 锁住屏幕 </li>
<li>ctrl+q : 恢复屏幕 </li>
<li>ctrl+v key: 输入特殊字符 </li>
<li>alt + l 将当前光标处之后的字母转化成小写字母 </li>
<li>alt + u 将当前光标处之后的字母转化成大写字母 </li>
<li>ctrl + Alt + e 扩展命令行的内容（例如：ls  =&gt;  ls  -l  --color=tty） </li>
<li>ctrl+c:杀死当前进程, 输入模式下，中断输入的命令。 </li>
<li>ctrl+d:退出当前 Shell </li>
<li>esc + . 快捷键可以轮询历史命令的参数或选项。 </li>
<li>esc + t 快捷键可以 置换前两个单词。 </li>
<li>输入重复字母 Esc {100} e 可以输入100个e字符</li>
<li>按多次{esc}可以补全 </li>
<li>{esc}{~}可以补全本机上的用户名 </li>
<li>{esc}{/}可以补全文件名 </li>
<li>{esc}{@}可以补全主机名,localhost可以方便地用 lo补全.
 </li>
</ul>
<h4>Bang Bang 历史命令</h4>
<div class="highlight-custom"><pre><span></span><code><span class="sx">!!    重新执行上一条命令 </span>
<span class="sx">!N  重新执行第N条命令。比如 !3 </span>
<span class="sx">!-N 重新执行倒数第N条命令。!-3 </span>
<span class="sx">!string  重新执行以字符串打头的命令。 比如 !vim </span>
<span class="sx">!?string?  重新执行包含字符串的命令。 比如 !?test.cpp? </span>
<span class="sx">!?string?%  替换为： 最近包含这个字符串的命令的参数。比如：   vim !?test.cpp?% </span>
<span class="sx">!$   替换为：上一条命令的最后一个参数。比如 vim !$ </span>
<span class="sx">!!string  在上一条命令的后面追加 string ，并执行。 </span>
<span class="sx">!Nstring  在第N条指令后面追加string，并执行。 </span>
^<span class="n">old</span>^<span class="n">new</span>^<span class="w">  </span>对上一条指令进行替换<span class="w"> </span>
<span class="n">修饰</span>
<span class="s">:s/old/new/</span><span class="w">  </span>对第<span class="n">N条指令中第一次出现的new替换为old</span>。<span class="w"> </span>比如<span class="w"> </span><span class="n">vim</span><span class="w"> </span>!?<span class="n">test</span><span class="p">.</span><span class="n">cpp</span>?<span class="p">:</span><span class="n">s</span><span class="o">/</span><span class="n">cpp</span><span class="o">/</span><span class="n">c</span><span class="o">/</span><span class="w"> </span>
<span class="p">:</span><span class="n">gs</span><span class="o">/</span><span class="n">old</span><span class="o">/</span><span class="n">new</span><span class="o">/</span><span class="w">  </span>全部替换<span class="w"> </span>
<span class="p">:</span><span class="n">wn</span><span class="w">  </span><span class="n">w为数字</span>，<span class="w"> </span>取指令的第<span class="n">w个参数</span><span class="p">.</span><span class="w"> </span>
<span class="p">:</span><span class="n">p</span><span class="w"> </span>回显命令而不是执行<span class="p">,</span><span class="w"> </span>比如<span class="w"> </span>!<span class="nb">ls</span><span class="p">:</span><span class="n">p</span><span class="w">  </span>。<span class="w"> </span>这个很有用，<span class="w"> </span>你可以先查看你选的命令对不对，要执行时再使用!!
</code></pre></div>

<h4>Bash相关文件</h4>
<div class="highlight-custom"><pre><span></span><code>     /etc/profile 设置环境变量(所有用户) 
     ~/.bash_profile 设置环境变量(当前用户) 
     ~/.bashrc 
     ~/.bash_history 
     ~/.bash_logout
</code></pre></div>

<h4>login shell 和 no-login shell</h4>
<p>“login shell” 代表用户登入, 比如使用 “su -“ 命令, 或者用 ssh 连接到某一个服务器上, 都会使用该用户默认 shell 启动 login shell 模式.</p>
<p>该模式下的 shell 会去自动执行 /etc/profile 和 ~/.profile 文件, 但不会执行任何的 bashrc 文件, 所以一般再 /etc/profile 或者 ~/.profile 里我们会手动去 source bashrc 文件.</p>
<p>而 no-login shell 的情况是我们在终端下直接输入 bash 或者 bash -c “CMD” 来启动的 shell. 该模式下是不会自动去运行任何的 profile 文件.</p>
<h4>bashrc 和 profile 的区别</h4>
<h5>profile</h5>
<p>其实看名字就能了解大概了, profile 是某个用户唯一的用来设置环境变量的地方, 因为用户可以有多个 shell 比如 bash, sh, zsh 之类的, 但像环境变量这种其实只需要在统一的一个地方初始化就可以了, 而这就是 profile.</p>
<h5>bashrc</h5>
<p>bashrc 也是看名字就知道, 是专门用来给 bash 做初始化的比如用来初始化 bash 的设置, bash 的代码补全, bash 的别名, bash 的颜色. 以此类推也就还会有 shrc, zshrc 这样的文件存在了, 只是 bash 太常用了而已.</p>
<hr>
<div class="highlight-custom"><pre><span></span><code><span class="n">！76</span><span class="w">                 </span><span class="n">没有空格，运行history中76号指令</span>
<span class="o">^</span><span class="mi">2</span><span class="o">^</span><span class="mi">1</span><span class="w">  </span><span class="n">把上个指令中的2改为1，并执行</span>
<span class="n">eg</span><span class="o">:</span><span class="w">     </span><span class="o">^</span><span class="mi">196</span><span class="o">^</span><span class="mi">1</span>

<span class="o">~</span><span class="w">   </span><span class="n">家目录</span>
<span class="o">~</span><span class="n">user1</span><span class="w">     </span><span class="n">user1的家目录</span>
<span class="o">-</span><span class="w">   </span><span class="n">上一个目录</span>

<span class="n">touch</span><span class="w"> </span><span class="err">{</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="err">}</span><span class="w">   </span><span class="n">建立</span><span class="w">  </span><span class="n">a</span><span class="w">  </span><span class="n">b两个文件</span>
<span class="n">touch</span><span class="w"> </span><span class="n">a</span><span class="err">{</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="err">}</span>
<span class="n">将建立</span><span class="w"> </span><span class="n">aa</span><span class="w"> </span><span class="n">ab两个文件</span>
<span class="n">touch</span><span class="w">  </span><span class="err">{</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="err">}</span><span class="p">.</span><span class="err">{</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="err">}</span><span class="w">     </span><span class="err">{}</span><span class="n">作用：排列组合</span>
<span class="n">将建立四个文件</span>

<span class="n">使用指令运行结果作为输入</span><span class="w"> </span><span class="n">用</span><span class="w"> </span><span class="n n-Quoted">``</span>
<span class="n">可以用在</span><span class="s2">&quot;&quot;</span><span class="n">中，优先级比</span><span class="s2">&quot;&quot;</span><span class="n">高</span>
<span class="n n-Quoted">`command`</span><span class="n">和$</span><span class="p">(</span><span class="n">command</span><span class="p">)</span><span class="n">一样</span>

<span class="n">设置环境变量</span><span class="w">   </span>
<span class="k">export</span><span class="w"> </span><span class="n">a</span><span class="o">=</span><span class="mi">3</span>
<span class="n">echo</span><span class="w">  </span><span class="n">$a</span>

<span class="n">用指令做数学运算</span>
<span class="n">echo</span><span class="w">  </span><span class="n">$</span><span class="err">[</span><span class="n">$a</span><span class="o">+</span><span class="mi">5</span><span class="err">]</span>
<span class="n">let</span><span class="w"> </span><span class="s2">&quot;a=$b+1&quot;</span>

<span class="n">用法：</span>
<span class="n">$</span><span class="err">[</span><span class="n">表达式</span><span class="err">]</span><span class="w">   </span><span class="n">（表达式中的空格不影响结果）</span>
<span class="n">建议表达式中变量和运算符用空格隔开，并前后各保留一个空格（标准语法）</span>
<span class="n">eg</span><span class="o">:</span><span class="w">   </span><span class="n">echo</span><span class="w">   </span><span class="n">$</span><span class="err">[</span><span class="w"> </span><span class="n">$a</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">$b</span><span class="w"> </span><span class="err">]</span>
<span class="n">除法结果只保留整数</span>
<span class="o">**</span><span class="n">表示次方</span><span class="w"> </span><span class="n">（幂运算）</span>

<span class="err">\</span><span class="n">反斜线</span><span class="w">   </span><span class="n">叫跳脱字元（符）</span>
<span class="n">可以把后面的字符按原本的样子呈现出来</span>
<span class="n">eg</span><span class="w"> </span><span class="o">:</span>
<span class="n">echo</span><span class="w">  </span><span class="n">your</span><span class="w"> </span><span class="n">cost</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="n">$5</span><span class="mf">.00</span>
<span class="n">结果显示</span>
<span class="n">your</span><span class="w"> </span><span class="n">cost</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="mf">.00</span>
<span class="n">echo</span><span class="w">  </span><span class="n">your</span><span class="w"> </span><span class="n">cost</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="err">\</span><span class="n">$5</span><span class="mf">.00</span>
<span class="n">显示正常</span>
<span class="n">如果指令最后一行是</span><span class="err">\</span><span class="n">，表示下一行继续输入这个指令，（直接去掉换行符）</span>

<span class="n">单双引号的使用</span>
<span class="n">echo</span><span class="w">  </span><span class="o">*</span><span class="w">        </span><span class="n">显示目录里有那些文件</span>
<span class="n">echo</span><span class="w">  </span><span class="err">\</span><span class="o">*</span><span class="w">      </span><span class="n">显示</span><span class="w">  </span><span class="o">*</span>
<span class="n">echo</span><span class="w">  </span><span class="s2">&quot;*&quot;</span><span class="w">     </span><span class="n">显示</span><span class="w">  </span><span class="o">*</span>
<span class="n">echo</span><span class="w">  </span><span class="s1">&#39;*&#39;</span><span class="w">     </span><span class="n">显示</span><span class="w">  </span><span class="o">*</span>

<span class="n">单引号可以禁止所有特殊字符的功能</span>
<span class="n">双引号可以禁止大多数特殊字符的功能，除了以下四个</span>
<span class="n">$</span><span class="w"> </span><span class="err">\</span><span class="w">  </span><span class="n n-Quoted">` ! </span>
<span class="n n-Quoted"> </span>
<span class="n n-Quoted">echo  !3</span>
<span class="n n-Quoted">显示 ls -l</span>
<span class="n n-Quoted">!3被解释为历史输入中的第3个</span>

<span class="n n-Quoted">ctrl+r   搜索历史输入的指令</span>

<span class="n n-Quoted">将上个指令的最后一个参数补进来</span>
<span class="n n-Quoted">用  按esc，松开，再按.   (dot)</span>
<span class="n n-Quoted">或 按alt+.   </span>

<span class="n n-Quoted">bash的指令编辑模式</span>
<span class="n n-Quoted">预设是emacs-style模式</span>
<span class="n n-Quoted">切换到vi-style模式 </span>
<span class="n n-Quoted">set  -o  vi</span>
<span class="n n-Quoted">set  -o  查看目前设定</span>
<span class="n n-Quoted"> 这里的 -  是disable的意思</span>
<span class="n n-Quoted">o是off的意思</span>
<span class="n n-Quoted">停用vi编辑模式   set +o vi</span>
<span class="n n-Quoted">切换到emacs模式  set  -o  emacs</span>

<span class="n n-Quoted">gnome-终端 快捷键</span>
<span class="n n-Quoted">ctrl+shift+t 打开新标签</span>
<span class="n n-Quoted">ctrl+pg up切换到写一个标签</span>
<span class="n n-Quoted">ctrl+ pg dn切换到上一个标签</span>
<span class="n n-Quoted">alt+N         N是数字，指定要切换到哪个标签</span>
<span class="n n-Quoted">ctrl+shift+w  关闭当前标签</span>
</code></pre></div>

<h2>readline库的键绑定</h2>
<p>在bash里面键绑定有两种方式， 1是通过readline库的~/.inputrc文件实现。2是通过bash的内建命令bind实现。
bind 可以绑定a. bash命令 b. readline命令 c. 宏 （意思是在当前行中插入字符串）
bind 用法：</p>
<div class="highlight-custom"><pre><span></span><code>查询键绑定：
bind -l 列出所有readline函数
bind -p 列出所有readline函数 以及对应的键绑定
bind -s 显示绑定的键序列和对应的宏
bind -q function 查询那些键将执行function

设置键绑定：
bind &#39;&quot;keyseq&quot;: command&#39; 绑定一个readline功能
bind &#39;&quot;keyseq&quot;:&quot;keystrokes&quot;&#39; 绑定readline宏 （自动输入按键序列）
bind -x &#39;&quot;keyseq&quot;: shell-command&#39; 绑定shell命令 
bind -r keyseq 取消当前任何 keyseq 的关联


常见快捷键转义序列：
\C-    Ctrl 前缀
\M-    Meta 前缀
\e     一个 Esc 字符
keyseq是快捷键对应的转义序列， 支持多个快捷键和普通按键。可以使用 Ctrl-v 来查看快捷键对应的转义序列

一个例子：
bind &#39;&quot;\C-x\C-r&quot;: re-read-init-file&#39; # 先按ctrl+x, 在按ctrl+r
bind bind &#39;&quot;^Xb&quot;: backward-kill-word&#39; # 先按ctrl+x,在按b
</code></pre></div></div>
    <footer>
<p class="meta">
  <span class="byline author vcard">
    Posted by <span class="fn">
        zhiliao
    </span>
  </span>
<time datetime="2014-09-26T21:55:00+08:00" pubdate>2014-09-26 21:55:00</time>  <span class="categories">
    <a class='category' href='/category/linux.html'>linux</a>
  </span>
  <span class="categories">
    <a class="category" href="/tag/linux.html">linux</a>,    <a class="category" href="/tag/bash.html">bash</a>  </span>
</p><div class="sharing">
</div>    </footer>
  </article>

</div>

<aside class="sidebar">
<section>
  <h1>Recent Posts</h1>
  <ul id="recent_posts">
    <li class="post">
        <a href="/posts/2023/08/22/bash-conversion.html">bash进制转换</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/16/remap-caps-ctrl.html">在Linux下交换Ctrl与大写锁定键</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/15/learn-java.html">java入门精粹</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/04/tcl-expect.html">Tcl 和 expect教程</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/01/armbian-config-software.html">armbian-config 支持自动安装的软件</a>
    </li>
  </ul>
</section><section>
  <h1>Categories</h1>
    <ul id="recent_posts">
      <li><a href="/category/android.html">android (2)</a></li>
      <li><a href="/category/blog.html">blog (1)</a></li>
      <li><a href="/category/bootloader.html">bootloader (2)</a></li>
      <li><a href="/category/container.html">container (1)</a></li>
      <li><a href="/category/database.html">database (1)</a></li>
      <li><a href="/category/editor.html">editor (4)</a></li>
      <li><a href="/category/filesystem.html">filesystem (1)</a></li>
      <li><a href="/category/firefox.html">firefox (1)</a></li>
      <li><a href="/category/git.html">git (4)</a></li>
      <li><a href="/category/golang.html">golang (1)</a></li>
      <li><a href="/category/gu-piao.html">股票 (1)</a></li>
      <li><a href="/category/ide.html">IDE (1)</a></li>
      <li><a href="/category/interview.html">interview (1)</a></li>
      <li><a href="/category/linux.html">linux (51)</a></li>
      <li><a href="/category/network.html">network (7)</a></li>
      <li><a href="/category/nltk.html">nltk (2)</a></li>
      <li><a href="/category/notes.html">notes (1)</a></li>
      <li><a href="/category/other.html">other (1)</a></li>
      <li><a href="/category/programming.html">programming (10)</a></li>
      <li><a href="/category/python.html">python (1)</a></li>
      <li><a href="/category/software.html">software (1)</a></li>
      <li><a href="/category/stock.html">stock (1)</a></li>
      <li><a href="/category/storage.html">storage (2)</a></li>
      <li><a href="/category/vm.html">vm (1)</a></li>
      <li><a href="/category/web.html">web (4)</a></li>
      <li><a href="/category/windows.html">windows (1)</a></li>
      <li><a href="/category/xwindow.html">xwindow (1)</a></li>
  </ul>
</section>
<section>
  <h1>Tags</h1>
    <a href="/tag/linux.html">linux</a>,    <a href="/tag/bash.html">bash</a>,    <a href="/tag/xwindow.html">Xwindow</a>,    <a href="/tag/programming-language.html">programming-language</a>,    <a href="/tag/java.html">java</a>,    <a href="/tag/programming.html">programming</a>,    <a href="/tag/software.html">software</a>,    <a href="/tag/storage.html">storage</a>,    <a href="/tag/debug.html">debug</a>,    <a href="/tag/c.html">C</a>,    <a href="/tag/git.html">git</a>,    <a href="/tag/patch.html">patch</a>,    <a href="/tag/text.html">text</a>,    <a href="/tag/selenium.html">selenium</a>,    <a href="/tag/web.html">web</a>,    <a href="/tag/docker.html">docker</a>,    <a href="/tag/flatpak.html">flatpak</a>,    <a href="/tag/interview.html">interview</a>,    <a href="/tag/qt.html">Qt</a>,    <a href="/tag/opensuse.html">openSUSE</a>,    <a href="/tag/filesystem.html">filesystem</a>,    <a href="/tag/ide.html">IDE</a>,    <a href="/tag/glang.html">glang</a>,    <a href="/tag/xdg.html">xdg</a>,    <a href="/tag/network.html">network</a>,    <a href="/tag/raspberry.html">raspberry</a>,    <a href="/tag/vm.html">vm</a>,    <a href="/tag/windows.html">windows</a>,    <a href="/tag/gdb.html">gdb</a>,    <a href="/tag/debian.html">debian</a>,    <a href="/tag/archlinux.html">archlinux</a>,    <a href="/tag/phicomm.html">phicomm</a>,    <a href="/tag/kernel.html">kernel</a>,    <a href="/tag/ext4.html">ext4</a>,    <a href="/tag/server.html">server</a>,    <a href="/tag/stock.html">stock</a>,    <a href="/tag/shu.html">书</a>,    <a href="/tag/gu-piao.html">股票</a>,    <a href="/tag/python.html">python</a>,    <a href="/tag/nltk.html">nltk</a>,    <a href="/tag/command.html">command</a>,    <a href="/tag/shell.html">shell</a>,    <a href="/tag/terminal.html">terminal</a>,    <a href="/tag/other.html">other</a>,    <a href="/tag/wireless.html">wireless</a>,    <a href="/tag/android.html">android</a>,    <a href="/tag/gtk.html">gtk+</a>,    <a href="/tag/gnome.html">gnome</a>,    <a href="/tag/keyboard.html">keyboard</a>,    <a href="/tag/firefox.html">firefox</a>,    <a href="/tag/arch.html">arch</a>,    <a href="/tag/database.html">database</a>,    <a href="/tag/mysql.html">mysql</a>,    <a href="/tag/notes.html">notes</a>,    <a href="/tag/sysctl.html">sysctl</a>,    <a href="/tag/vim.html">vim</a>,    <a href="/tag/editor.html">editor</a>,    <a href="/tag/pelican.html">pelican</a>,    <a href="/tag/blog.html">blog</a>,    <a href="/tag/book.html">book</a>,    <a href="/tag/bootloader.html">bootloader</a></section>
    <section>
        <h1>Social</h1>
        <ul>
            <li><a href="https://github.com/zhangjiaxing" target="_blank">github</a></li>
            <li><a href="http://wpa.qq.com/msgrd?v=3&uin=347820393&site=qq&menu=yes" target="_blank">qq</a></li>
            <li><a href="http://www.writebug.cn" target="_blank">blog</a></li>
            <li><a href="http://gallery.writebug.cn" target="_blank">gallery</a></li>
        </ul>
    </section>
    <section>
        <h1>Blogroll</h1>
        <ul>
            <li><a href="http://getpelican.com/" target="_blank">Pelican</a></li>
        </ul>
    </section>

</aside>
    </div>
  </div>
  <footer role="contentinfo">
<p>
    Copyright &copy;  2013&ndash;2023  zhiliao &mdash;
  <span class="credit">Powered by <a href="http://getpelican.com">Pelican</a></span>
</p>  </footer>
</body>
</html>